package com.ptswitch.material.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hxzon.project.EDao;
import com.ptswitch.material.model.Upload;
import com.ptswitch.material.service.UploadService;
import com.ptswitch.material.util.DateUtils;
@Service("uploadSer")
public class UploadServiceImpl extends LoggerService implements UploadService {
	@Resource
	private EDao<Upload> uploadDao;
	
	public long countAll() {
		return uploadDao.countAll();
	}

	public long countLike(String like) {
		return uploadDao.countLike(like);
	}
	
	public void delete(String id){
		uploadDao.delete(id);
	}

	public void delete(Upload model) {
		uploadDao.delete(model);
	}
	
	public void deleteAll(){
		
	}
	
	public void deleteAll(List<Upload> models){
		
	}

	public Upload get(String id) {
		return uploadDao.get(id);
	}
	
	public List getAll(){
		return uploadDao.getAll();
	}

	public List getAll(long first, long size) {
		return uploadDao.getAll(first, size);
	}

	public List getLike(String like, long first, long size) {
		return uploadDao.getLike(like, first, size);
	}

	public void save(Upload model) {
		model.setCreateTime(DateUtils.format(new Date()));
		uploadDao.save(model);
	}
	
	public void saveAll(List<Upload> models){
		
	}

	public long countLike(Upload model) {
		// TODO Auto-generated method stub
		return 0;
	}

	public List<Upload> getLike(Upload model, long first, long size) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public String valid(Upload model){
		return null;
	}

}
